<?php
#####################################################
# RWCARDS - Joomla E-Cards Componment!
# Copyright (C) 2004/2005 by Ralf Weber
# Company    : LoadBrain
# Homepage   : www.weberr.de
# Version    : 2.1.0
# Date       : 23/11/2005
# License    : Released under GPL
######################################################

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class rwcards_html
{

  function setTitle($step)
  {
       
  ?>
       <table cellpadding="2" cellspacing="0" border="0">
       <tr>
              <td class="componentheading"><?php echo $step; ?></span></td>
       </tr>
       </table>
              <?
       }
       

       
       function RWCardsWrite($rows, $info, $Itemid, $sessionId, $bgcolor)
       {
              $rows[0]->message = str_replace ( "\r\n", "<br />", $rows[0]->message);
              $info = str_replace ( "\
r\n", "<br />", $info);
              ?>
               <table align="center" cellpadding="2" cellspacing="10" border="0">
              <tr>
                  <td><a href="javascript:showFront('card');"><?php echo _SHOW_FRONT_CARD; ?></a></td>
               <td align="right"><a href="javascript:showBack('card');"><?php echo _SHOW_BACK_CARD; ?></a></td>
              </tr>
              </table>
              
              <div id="card" align="center" style="visibility:visisble;"></div>

              <script language="JavaScript">
              
              showFront('card');       
              
              function showFront(cardShow)
              {
                     document.getElementById(cardShow).innerHTML = "<img src='./images/stories/cards/<?php echo $rows[0]->picture; ?>' alt='<?php echo $rows[0]->picture; ?>' hspace='2' vspace='2' border='0' style='border:1px solid black;' />";
              }
              
              function showBack(cardShow)
              {
                     document.getElementById(cardShow).innerHTML = "<table cellpadding='0' cellspacing='6' border='1' style='border:1px solid black;background-color:<?php echo $bgcolor[0]->backgroundcolor;?>;'><tr><td><table cellpadding='0' cellspacing='0' border='0' style='border:1px solid black;background-color:#ffffff;'><tr><td width='200' rowspan='2' valign='top'><div style='color:#000000;padding:10px;width=200;text-align:right;'><?php echo strftime( _DATE_FORMAT_LC, strtotime($rows[0]->sendDate)); ?></div><div style='color:#000000;padding:10px;width=200;font-size:13px;font-family:sans-serif;'><?php echo nl2br($rows[0]->message);?></div><div style='color:#000000;padding:20px;width=200;text-align:right;font-weight:bold;'><?php echo $rows[0]->nameFrom  . "<br />" . $rows[0]->emailFrom; ?></div></td><td rowspan='3' width='1' style='background-color:#000000;><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/images/blank.png' alt='' width='2' height='100' border='0' align='right' /></td><td valign='top' align='right' style='background-color:#ffffff;'><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/stempel.gif' style='padding-top:10px;padding-right:5px;text-align:right;' /><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/stamp2.jpg'style='padding-top:10px;padding-right:5px;text-align:right;' /></td></tr><tr><td align='right' valign='top' style='background-color:#ffffff;'><p>&nbsp;</p><div style='font-size:13px;color:#000000;line-height:12pt;padding-left:30px;padding-right:10px;'><?php echo _NAME_TO;?></div><div style='color:#0066FF;font-size:12px;;line-height:12pt;padding-left:30px;padding-right:10px;'><?php echo $rows[0]->nameTo . " <br />" . $rows[0]->emailTo; ?></div><p>&nbsp;</p><p align='center'><span line-height:12pt;padding-left:30px;padding-right:10px;'><a href='./index.php?option=com_rwcards&amp;Itemid=<?php echo $Itemid; ?>&amp;&sesja=<?php echo $sessionId;?>'><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/restamp.jpg' title='<?php echo _RE_SEND;?>' border='0' /><br /><?php echo _RE_SEND;?></a>&nbsp;</span></td></tr><tr><td height=30><div style='color:#82C0FF;padding:5px;width=200;text-align:left;font-size:10px;'><hr size=1><?php echo addslashes($info);?></div><img src='<?php echo $GLOBALS['mosConfig_live_site']; ?>/images/blank.png' alt='' width='200' height='1' border='0' /></td><td>&nbsp;</td></tr></table></td></tr></table>";
              }
              </script>       
              <?php
       }

function RWCardsFirstView($cards, $Itemid, $sesja)
{
	$categoryIds = array();
?>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
		<td class="sectiontableheader" colspan="2"><?php echo _RWCARDS_LANG_CHOOSE_CATEGORY . "<strong>" . $categoryName . "</strong>"; ?></td>
</tr>
</table>
<br />

<table width="80%" border="0" cellspacing="5" cellpadding="2" align="center">
		<tr>
				<td colspan="2" style="border-bottom:1px solid black;"></td>
		</tr>
<?php
$sesjachange = $sesja;
	if (count( $cards ) > 0)
  {
		foreach($cards as $val)
		{
			if( in_array($val->category_id, $categoryIds) )
			{
				next;
			}
			else
			{
?>
		<tr>
				<td valign="top"><a href="index.php?option=com_rwcards&category_id=<?php echo $val->category_id; ?>&amp;task=listCards&sesja=<?php echo $sesjachange; ?>&Itemid=<?php echo $Itemid; ?>"><?php echo $val->category_kategorien_name; ?></a><br />
<br />
<?php echo $val->category_description; ?>
</td>
				<td><div style="text-align:right;"><a href="index.php?option=com_rwcards&category_id=<?php echo $val->category_id; ?>&amp;task=listCards&sesja=<?php echo $sesjachange; ?>&Itemid=<?php echo $Itemid; ?>"><img src="./images/stories/cards/<?php echo strtolower( substr($val->picture, 0, -4) ) . "_t.jpg"; ?>" title="<?php echo $val->picture; ?>"  border="0" style="text-align:right;"></a></div></td>
		</tr>
		<tr>
				<td colspan="2" style="border-bottom:1px solid;"></td>
		</tr>
<?php
			}
			array_push($categoryIds, $val->category_id);
		}
	}
	else
	{
                ?>
              <table width="100%" border="0" cellspacing="0" cellpadding="2">
               <tr>
                     <td class="sectiontableheader" colspan="2"><span style="color:red;"><?php echo _RWCARDS_NO_PICTURES_AVAILABLE_IN_THIS_CATEGORY; ?></span></td>
            </tr>
</table>
                <?php
                }
?>
</table>
<?php
}



       function RWCardsListCards( $step, &$daten, $Itemid, $categoryName, $categoryList, $sesja, $conf)
       {
              global $mainframe;
			  $k = "";
			  
              $params = array(
              'itemData' => $daten,
              'perPage' => $conf[0]->cardsperpage,
              'delta' => 8,            
              'append' => true,
              'clearIfVoid' => false,
              'urlVar' => 'entrant',
              'mode'  => 'Jumping',
              );
              
              $pager = & Pager::factory($params);
              $page_data = $pager->getPageData();
              list($from, $to) = $pager->getOffsetByPageId();
              $links = $pager->getLinks();

       ?>
              <script language="JavaScript">
              
              function changeCategory()
              {
                     document.formRWCardsWriteCardList.submit();
              }
              </script>
              
              <script language="JavaScript" src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/lightbox/js/prototype.js" type="text/javascript"></script>
<script language="JavaScript" src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/lightbox/js/scriptaculous.js"></script>
<script language="JavaScript" src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/lightbox/js/lightbox.js"></script>
<link rel="stylesheet" href="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/lightbox/css/lightbox.css" type="text/css" media="screen" />
<? $sesjachange = $sesja;?>
              <form method="post"  name="formRWCardsWriteCardList" action="index.php?option=com_rwcards&amp;task=listCards&Itemid=<?php echo $_REQUEST['Itemid']; ?>&sesja=<?php echo $sesjachange; ?>">
                <table width="100%" border="0" cellspacing="0" cellpadding="2">
           		<tr>
               		<td class="sectiontableheader" colspan="2"><?php echo $step; ?></td>
             	</tr>
              	<tr>

                     <td><?php echo _RWCARDS_LANG_CHOSEN_CATEGORY . "<strong>" . $categoryName . "</strong>"; ?></td>
                     <td align="right"><div style="text-align:right;"><?php echo $categoryList; ?></div></td>
              </tr>
              </table>
              </form>
       <?php
              if (count( $daten ))
                {
       ?>
              <table width="100%" border="0" cellspacing="5" cellpadding="2">
              <tr>
                     <td width="33%">&nbsp;<?php echo $links['back']; ?></td>
                     <td>&nbsp;</td>
                     <td width="33%"><div style="text-align:right;">&nbsp;<?php echo $links['next']; ?></div></td>
              </tr>
			  </table>
			  <table width="100%" border="0" cellspacing="5" cellpadding="2">
              <tr>
              <tr>
              <?php
           for($i = ($from - 1); $i<$to; $i++)
           {       

              ?><!-- 
onMouseOver="return overlib('<img src=./images/stories/cards/<?php echo $page_data[$i]->picture; ?> border=1 style=padding:5px;background-color:#f0f0f0;/>', FULLHTML, BGCOLOR, '#006600', ABOVE, LEFT);" onmouseout="return nd();"-->


                       <td valign="top" style="border:1px solid black; padding:5px;">&nbsp;<a href="index.php?option=com_rwcards&amp;Itemid=<?php echo $Itemid; ?>&amp;task=FillCard&cardId=<?php echo $page_data[$i]->id;?>&sesjaID=<?php echo $sesja;?>"><img src="./images/stories/cards/<?php echo strtolower( substr($page_data[$i]->picture, 0, -4) ) . "_t.jpg"; ?>" title="<?php echo $step; ?>"  border="0"></a>
                       <a href="./images/stories/cards/<?php echo $page_data[$i]->picture; ?>" rel="lightbox[roadtrip]" title="<?php echo _RWCARDS_AUTHOR; ?>: <?php echo $page_data[$i]->autor; ?><br/><?php echo _RWCARDS_DESCRIPTION; ?>: <?php echo nl2br($page_data[$i]->description); ?>"><img src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/lupe.jpg" border="0" /></a> <br />
                       <br />
						<table width="150px" border="0" cellspacing="5" cellpadding="2">
              			<tr>
							<td style="color:#767676; font-weight:bold;"><?php echo _RWCARDS_AUTHOR; ?></td><td  class="contentdescription"><?php echo $page_data[$i]->autor; ?></td>
						</tr>
						<tr>
							<td valign="top"  style="color:#767676; font-weight:bold;"><?php echo _RWCARDS_DESCRIPTION; ?></td><td  class="contentdescription"><?php echo nl2br($page_data[$i]->description); ?></td>
						</tr>
						</table>
					</td>
            <?php
                  $k++;
                  if($k % $conf[0]->rowssperpage == 0)
                  {
                         echo "</tr><tr>";
                       }
                } ?>
                </tr>
      </table>
     <? }
                 else
                {
                ?>
              <table width="100%" border="0" cellspacing="0" cellpadding="2">
               <tr>
                     <td class="sectiontableheader" colspan="2"><span style="color:red;"><?php echo _RWCARDS_NO_PICTURES_AVAILABLE_IN_THIS_CATEGORY; ?></span></td>
            </tr>
</table>
                <?php
                }
       }








       function RWCardsWriteForm($id, $Itemid, $image, $rows, $sesjaID, $advanceddays, $captcha, $userdata)
       {
		   	global $my;
		   
		   	// if user logged in, put name an email in fields of sender
			if($my->id)
			{
			 $loggedInUsername = $userdata[0]->username;
			 $loggedInUserEmail = $userdata[0]->email;
			}
			 //captcha
			 if ($captcha == "1")
			 {
			 			if (empty($_GET['session_code'])) 
						{ $session_code = md5(round(rand(0,40000))); } 
						else 
						{ $session_code=$_GET['session_code']; }	
	
          	$my_captcha = new captcha( $session_code, './components/com_rwcards/captcha/__TEMP__' );
          	$pic_url = $my_captcha->get_pic( 4 );
			}
	   	if (eregi( "\.gif", $image ))
	   	{
	      	$imageHidden = strtolower( substr($image, 0, -4) ) . ".gif";
		}
		else
		{
			$imageHidden = strtolower( substr($image, 0, -4) ) . "_t.jpg"; 
		}
			$imagePreview = strtolower( substr($image, 0, -4) ) . "_t.jpg"; 
  

	     ?>
			 <script language="JavaScript" src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/captcha/captchAjax.js" type="text/javascript"></script>
       <script language="JavaScript" src="<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/rwcards.formValidator.js" type="text/javascript"></script>
       <script language="JavaScript" type="text/javascript">
       function validate()
       {
        v = new formValidator('rwCardsForm', 'white', '#B0CADB');
       
        v.isEmpty('rwCardsForm[nameFrom]', '<?php echo _RWCARDS_FORM_ERROR_NAME_FROM; ?>');
        v.isEmail('rwCardsForm[emailFrom]', '<?php echo _RWCARDS_FORM_ERROR_EMAIL_FROM; ?>');
        v.isEmpty('rwCardsForm[nameTo]', '<?php echo _RWCARDS_FORM_ERROR_NAME_TO; ?>');
        v.isEmail('rwCardsForm[emailTo]', '<?php echo _RWCARDS_FORM_ERROR_EMAIL_TO; ?>');
        v.isEmpty('rwCardsForm[message]', '<?php echo _RWCARDS_FORM_ERROR_MESSAGE; ?>');
								v.isEmpty('rwCardsForm[captcha]', '<?php echo _RWCARDS_FORM_CAPTURE_ERROR_MESSAGE; ?>');
								
               if (v.isError() )
                {
                  v.errorPrint();
                   return false;
                }
       }
       </script>
       

	<br />       
    <form name="rwCardsForm" method="post" action="index.php?option=com_rwcards&task=SendCard&Itemid=<?php echo $Itemid?>&cardId=<?php echo $id?>&session_code=<?php echo $session_code; ?>&sesjaID=<?php echo $sesjaID; ?>" onsubmit="return validate();">
    <table border="0" cellspacing="0" cellpadding="2">
		<tr>
      <td nowrap><?php echo _NAME_FROM;?></td>
      <td><input name="rwCardsForm[nameFrom]" value="<? echo (isset($_SESSION['nameFrom'])) ? $_SESSION['nameFrom'] : $loggedInUsername ?>" type="text" class="inputbox"></td>
      <td valign="top" rowspan="8"><img src="./images/stories/cards/<?php echo $imagePreview; ?>" hspace="2" /></td>
    </tr>
    <tr>
      <td nowrap><?php echo _EMAIL_FROM;?></td>
      <td><input name="rwCardsForm[emailFrom]" value="<? echo (isset($_SESSION['emailFrom'])) ? $_SESSION['emailFrom'] : $loggedInUserEmail; ?>" type="text" class="inputbox"></td>
    </tr>
    <tr>
      <td nowrap><?php echo _NAME_TO;?></td>
      <td><input name="rwCardsForm[nameTo]" value="<? if ($sesjaID == ""){echo (isset($_SESSION['nameTo'])) ? $_SESSION['nameTo'] : "";} else{echo  $rows[0]->nameFrom;}?>" type="text" class="inputbox"></td>
    </tr>
    <tr>
      <td nowrap><?php echo _EMAIL_TO;?></td>
           <td><input name="rwCardsForm[emailTo]" value="<? if ($sesjaID == ""){echo (isset($_SESSION['emailTo'])) ? $_SESSION['emailTo'] : "";} else{echo $rows[0]->emailFrom;}?>" type="text" class="inputbox"></td>
    </tr>
	<?php
	$currentDay = date("d");
	$currentMonth = date("m");
	$currentYear = date("Y");
	$selected = (isset($_SESSION['sendDate'])) ? $_SESSION['sendDate'] : "$currentYear-$currentMonth-$currentDay";

	if ($advanceddays == 0)
   	{
      		$show .= '<input name="rwCardsForm[sendDate]" value="';
      		$show .= "$currentYear-$currentMonth-$currentDay";
      		$show .= '" type="hidden" />';
	}
	else
	{
		$show .= '<tr>';
		$show .= '<td nowrap>';
		$show .= _SEND_DATE;
		$show .= '</td>';
		$show .= '<td><select name="rwCardsForm[sendDate]" size"1" class="inputbox">'; 
		$i = 0;

		for ($currentDay; $i <= $advanceddays; $currentDay++)
		{
			$option_date = date("Y-m-d",mktime(0,0,0,$currentMonth,$currentDay,$currentYear));
			$show .= "<option value='$option_date' ";
			$show .= ($selected == $option_date) ? ' selected="selected"> ' : ' >';
			$show .= strftime( _DATE_FORMAT_LC, strtotime($option_date));
			$show .= '</option>';
			$i++;
		}
		$show .= '</td></select>';
		$show .= '</tr>';
	}
	echo $show;
	?>

    <tr>
      <td nowrap valign="top"><?php echo _MESSAGE;?></td>
      <td><textarea name="rwCardsForm[message]" class="inputbox" rows="5" cols="15"><?php echo (isset($_SESSION['message'])) ? $_SESSION['message'] : ""; ?></textarea></td>
    </tr>
		<?php
		if ($captcha == "1")
		{
		?>
    <tr>
      <td nowrap valign="top"><?php echo _RWCARDS_FORM_CAPTURE; ?></td>
      <td><img src="./components/com_rwcards/captcha/captcha_image.php?img=<?php echo $pic_url;  ?>"></td>
    </tr>
    <tr>
      <td nowrap valign="top"><?php echo _RWCARDS_FORM_CAPTURE_CODE; ?></td>
      <td><input name="rwCardsForm[captcha]" value="" type="text" class="inputbox" onblur="checkCaptcha('<?php echo $Itemid . "', '" . $id . "', '" . $session_code, "', '" . _RWCARDS_FORM_CAPTURE_ERROR_MESSAGE;  ?>','' + this.value + '');"></td>
    </tr>
    <tr>
      <td colspan="2"><?php echo _RWCARDS_FORM_CAPTCHA_HINT;?></td>
    </tr>
		<input type="hidden" name="captcha_config" value="<?php echo $captcha; ?>" />
		<?php
		}
		?>
    <tr>
      <td><input type="submit" name="submit" value="<?php echo _PREVIEW_CARD;?>" class="button" /></td>
      <td align="right"><input type="submit" name="submit" value="<?php echo _SEND_CARD;?>" class="button"></td>
    </tr>
    </table>
    <input type="hidden" name="rwCardsForm[image]" value="<?php echo $imageHidden; ?>" />
    </form>
       <?
       }







       function CardSent($link, $sendDate)
       {
	if ($sendDate == date("Y-m-d"))
	{
	$send_msg = _CARD_SENT_HINT;
	}
	else
	{
	$send_msg = _CARD_SEND_ADVANCED_HINT;
	$show .= '<table cellpadding="2" cellspacing="0" border="0"><tr><td class="componentheading">';
	$show .= strftime( _DATE_FORMAT_LC, strtotime($sendDate)); 
	$show .= '</span></td></tr></table>';
	echo $show;
	}
       ?>
       <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
	   <td align=center><br><br><br><?php echo $send_msg; ?><br /><br /><a href="<?php echo $link?>"><?php echo _CARD_VIEW;?></a><br /><br /></td>
       </tr>
       </table>
       <?
       }

       function RWCardsWriteFooter()
       {
       ?>
       <br /><br />
       <div align="center" class="small" style="color:#CECECE;">RWCards <?php echo _RWCARDS_VERSION; ?> Copyright &copy; 2004/2005 by <a href="http://www.weberr.de/" target="_blank" style="color:#CECECE;">Ralf Weber - LoadBrain</a>.</div>
       <?
       }

  function RWCardsPreviewSentCard($cardId, $Itemid, $pic, $text, $info, $bgcolor)
  {

  	if (eregi( "\.gif", $pic ))
	{
		$bildName = $pic;
	}
	else
	{
		$bildName = strtolower( substr($pic, 0, -6) ) . ".jpg";
	}
        $text = str_replace ( "\r\n", "", $text);
		$info = str_replace ( "\r\n", "", $info);

         ?>       
        <table align="center" cellpadding="2" cellspacing="10" border="0">
       <tr>
           <td><a href="javascript:showFront('card');"><?php echo _SHOW_FRONT_CARD; ?></a></td>
        <td align="right"><a href="javascript:showBack('card');"><?php echo _SHOW_BACK_CARD; ?></a></td>
       </tr>
       </table>
       
       <div id="card" align="center" style="visibility:visisble;"></div>
    
       <form name="rwCardsForm" method="post" action="index.php?option=com_rwcards&Itemid=<?php echo $Itemid?>&task=SendCard&cardId=<?php echo $cardId?>">
       <table align="center" cellpadding="2" cellspacing="10" border="0"> 
       <tr>
                 <td>&nbsp;&nbsp;<a href="./index.php?option=com_rwcards&Itemid=<?php echo $Itemid; ?>&task=FillCard&cardId=<?php echo $cardId; ?>"><?php echo _BACK; ?></a></td>
           <td align="right"><input type="submit" name="submit" value="<?php echo _SEND_CARD;?>" class="button" /></td>
         </tr>
       </table>
           <input name="rwCardsForm[nameFrom]" value="<?php echo $_SESSION['nameFrom']; ?>" type="hidden" />
           <input name="image" value="<?php echo $bildName; ?>" type="hidden" />
           <input name="rwCardsForm[emailFrom]" value="<?php echo $_SESSION['emailFrom']; ?>" type="hidden" />
           <input name="rwCardsForm[nameTo]" value="<?php echo $_SESSION['nameTo']; ?>" type="hidden" />
           <input name="rwCardsForm[emailTo]" value="<?php echo $_SESSION['emailTo']; ?>" type="hidden" />
           <input name="rwCardsForm[sendDate]" value="<?php echo $_SESSION['sendDate']; ?>" type="hidden" />
           <input name="rwCardsForm[message]" value="<?php echo $_SESSION['message']; ?>" type="hidden" />
           </form>
       
       <script language="JavaScript">
       
       showFront('card');       
       function showFront(cardShow)
       {
              document.getElementById(cardShow).innerHTML = "<img src='<?php echo './images/stories/cards/' . $bildName; ?>' alt='<?php echo $bildName; ?>' hspace='2' vspace='2' border='0' style='border:1px solid black;' />";
       }
       
       function showBack(cardShow)
       {
             document.getElementById(cardShow).innerHTML = "<table width='200' cellpadding='0' cellspacing='6' border='0' style='border:1px solid black;background-color:<?php echo $bgcolor[0]->backgroundcolor;?>;'><tr><td><table cellpadding='0' cellspacing='0' border='1' style='border:1px solid black;background-color:#ffffff;'><tr><td width='200' rowspan='2' valign='top'><div style='color:#000000;padding:10px;width=200;text-align:right;'><?php echo strftime( _DATE_FORMAT_LC, strtotime($_REQUEST['rwCardsForm']['sendDate']));?></div><div style='color:#000000;padding:10px;width=200;'><?php echo $text;?></div><div style='color:#000000;padding:20px;width=200;text-align:right;font-weight:bold;'><?php echo $_REQUEST['rwCardsForm']['nameFrom'] . "<br />" . $_REQUEST['rwCardsForm']['emailFrom'];?></div></td><td rowspan='3' width='1' style='background-color:#000000;><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/images/blank.png' alt='' width='2' height='300' border='0' align='right' /></td><td valign='top' align='right' style='background-color:#ffffff;'><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/stempel.gif' style='padding-top:10px;padding-right:5px;text-align:right;' /><img src='<?php echo $GLOBALS['mosConfig_live_site'];?>/components/com_rwcards/images/stamp2.jpg'style='padding-top:10px;padding-right:5px;text-align:right;' /></td></tr><tr><td align='right' valign='top' style='background-color:#ffffff;'><div style='color:#000000;line-height:12pt;padding-left:30px;padding-right:10px;'><?php echo _NAME_TO;?></div><div style='color:#0066FF;font-size:12px;;line-height:12pt;padding-left:30px;padding-right:10px;'><?php echo $_REQUEST['rwCardsForm']['nameTo'] . "<br />" . $_REQUEST['rwCardsForm']['emailTo']; ?></div></td></tr><tr><td height=30><div style='color:#82C0FF;padding:5px;width=200;text-align:left;font-size:10px;'><hr size=1><?php echo addslashes($info);?></div><img src='<?php echo $GLOBALS['mosConfig_live_site']; ?>/images/blank.png' alt='' width='200' height='1' border='0' /></td><td>&nbsp;</td></tr></table></td></tr></table>";
        }
       </script>

            
  <?php
  }
}
?>
